# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kruler
pkgver=24.02.2
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/graphics/org.kde.kruler"
pkgdesc="An on-screen ruler for measuring pixels"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kdoctools-dev
	ki18n-dev
	knotifications-dev
	kstatusnotifieritem-dev
	kwindowsystem-dev
	kxmlgui-dev
	qt6-qtbase-dev
	samurai
	"
subpackages=" $pkgname-lang"
_repo_url="https://invent.kde.org/graphics/kruler.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kruler-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e8b15f37e845135527acf9a86c351e9f78d254c46a5c0a3eb0b46232db51263b475574535c5a40c58df8c823a9552e6d69cf6d12c3b6f61e2bd22c9405da18f2  kruler-24.02.2.tar.xz
"
